package org.cable.link.feign;

import org.cable.common.util.JsonData;
import org.cable.link.controller.request.UseTrafficRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author hsj
 * @date 2024/1/10 10:18
 */
@FeignClient(name = "dcloud-account-service")
public interface TrafficFeignService {

	/**
	 * 使用流量包
	 * @param useTrafficRequest
	 * @return
	 */
	@PostMapping(value = "/api/traffic/v1/reduce",headers = {"rpc-token=${rpc.token}"})
	JsonData userTraffic(@RequestBody UseTrafficRequest useTrafficRequest);
}
